package net.zjitc.common;


/**
 * @Author 毛钰深
 * @Create 2021/12/27 10:15
 */

public enum ResponseCode {
    SUCCESS(200,"获取成功"),
    CREATED(201,"创建成功"),
    DELETED(204,"删除成功"),
    BAD_REQUEST(400,"请求的地址不存在或者包含不支持的参数"),
    NOT_FOUND(404,"请求的资源不存在"),
    UNPROCESABLE_ENTITY(422,"当创建一个对象时，发生一个验证错误"),
    ERROR(500,"内部错误"),
    FORBIDDEN(403,"权限不足")
    ;


    private Integer code;
    private String message;

    ResponseCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
